The "Power mode" string in the quick settings menu appears both in the
title of the button and as the menu header that opens when clicking on
such button.
Currently they are translated together, but---at least in
Italian---the standard translation, "Modalità energia", is too long to
fit in the button and is very often truncated to "Modalità…" (aka
"Mode", in English) from which is not clear what the menu is about.
We would use "Energia" for the button title, but at the same time it
would be nice to have the full "Modalità energia" translation in the
menu header, where there is more space available.
For this reason I propose to add contexts to the two "Power mode"
strings, so that the string can be translated in different ways
depending on its position.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3903>
class PowerProfilesToggle extends QuickMenuToggle {
_init() {
super._init({
- title: _('Power Mode'),
+ title: C_('Quick settings button title', 'Power Mode'),
menuButtonAccessibleName: _('Open power profiles menu'),
});
this._profileSection = new PopupMenu.PopupMenuSection();
this.menu.addMenuItem(this._profileSection);
- this.menu.setHeader('power-profile-balanced-symbolic', _('Power Mode'));
+ this.menu.setHeader('power-profile-balanced-symbolic', C_('Quick settings menu header', 'Power Mode'));
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
this.menu.addSettingsAction(_('Power Settings'),
'gnome-power-panel.desktop');